package com.galen.manual.controller;

import com.galen.manual.common.Result;
// import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/database")
public class DatabaseController {

    private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(DatabaseController.class);

    @PostMapping("/init-admin")
    public Result<String> initAdminSchema() {
        try {
            log.info("数据库初始化功能暂时禁用");
            return Result.success("数据库初始化功能暂时禁用");
        } catch (Exception e) {
            log.error("初始化数据库失败", e);
            return Result.error("初始化失败: " + e.getMessage());
        }
    }
}